<template>
  <div class="p-2">
    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
      <div v-show="showSearch" class="mb-[10px]">
        <el-card shadow="hover">
          <el-form ref="queryFormRef" :model="queryParams" :inline="true">
            <el-form-item label="设备id" prop="deviceId">
              <el-input v-model="queryParams.deviceId" placeholder="请输入设备id" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="触发的规则ids" prop="ruleIds">
              <el-input v-model="queryParams.ruleIds" placeholder="请输入触发的规则ids" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="推送编号，1，2，3" prop="noticeNumber">
              <el-input v-model="queryParams.noticeNumber" placeholder="请输入推送编号，1，2，3" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="超过X天未学习" prop="unlearnOverDays">
              <el-input v-model="queryParams.unlearnOverDays" placeholder="请输入超过X天未学习" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="课程更新后X小时后开始学习" prop="learnStartAfterUpdateHour">
              <el-input v-model="queryParams.learnStartAfterUpdateHour" placeholder="请输入课程更新后X小时后开始学习" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="课程更新后第X天完成学习" prop="learnCompletionAfterUpdateDay">
              <el-input v-model="queryParams.learnCompletionAfterUpdateDay" placeholder="请输入课程更新后第X天完成学习" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="课程学习完成数量为X" prop="courseCompletionNumber">
              <el-input v-model="queryParams.courseCompletionNumber" placeholder="请输入课程学习完成数量为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="课程学习未完成数量X" prop="courseUncompletionNumber">
              <el-input v-model="queryParams.courseUncompletionNumber" placeholder="请输入课程学习未完成数量X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="患者当周课程学习进度" prop="weekLearnCompletionRateBef0">
              <el-input v-model="queryParams.weekLearnCompletionRateBef0" placeholder="请输入患者当周课程学习进度" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="患者APP使用为第X周" prop="appRegisterDuration">
              <el-input v-model="queryParams.appRegisterDuration" placeholder="请输入患者APP使用为第X周" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef6">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef6" placeholder="请输入6天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef5">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef5" placeholder="请输入5天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef4">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef4" placeholder="请输入4天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef3">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef3" placeholder="请输入3天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef2">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef2" placeholder="请输入2天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef1">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef1" placeholder="请输入1天前忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef0">
              <el-input v-model="queryParams.dayInterfereIgnoreTimesBef0" placeholder="请输入当日忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6日前干预提醒响应率为X" prop="dayInterfereResponsivityBef6">
              <el-input v-model="queryParams.dayInterfereResponsivityBef6" placeholder="请输入6日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5日前干预提醒响应率为X" prop="dayInterfereResponsivityBef5">
              <el-input v-model="queryParams.dayInterfereResponsivityBef5" placeholder="请输入5日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4日前干预提醒响应率为X" prop="dayInterfereResponsivityBef4">
              <el-input v-model="queryParams.dayInterfereResponsivityBef4" placeholder="请输入4日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3日前干预提醒响应率为X" prop="dayInterfereResponsivityBef3">
              <el-input v-model="queryParams.dayInterfereResponsivityBef3" placeholder="请输入3日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2日前干预提醒响应率为X" prop="dayInterfereResponsivityBef2">
              <el-input v-model="queryParams.dayInterfereResponsivityBef2" placeholder="请输入2日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1日前干预提醒响应率为X" prop="dayInterfereResponsivityBef1">
              <el-input v-model="queryParams.dayInterfereResponsivityBef1" placeholder="请输入1日前干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日干预提醒响应率为X" prop="dayInterfereResponsivityBef0">
              <el-input v-model="queryParams.dayInterfereResponsivityBef0" placeholder="请输入当日干预提醒响应率为X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3周前运动完成率" prop="weekExerciseCompletionRateBef3">
              <el-input v-model="queryParams.weekExerciseCompletionRateBef3" placeholder="请输入3周前运动完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2周前运动完成率" prop="weekExerciseCompletionRateBef2">
              <el-input v-model="queryParams.weekExerciseCompletionRateBef2" placeholder="请输入2周前运动完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1周前运动完成率" prop="weekExerciseCompletionRateBef1">
              <el-input v-model="queryParams.weekExerciseCompletionRateBef1" placeholder="请输入1周前运动完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当周前运动完成率" prop="weekExerciseCompletionRateBef0">
              <el-input v-model="queryParams.weekExerciseCompletionRateBef0" placeholder="请输入当周前运动完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef6">
              <el-input v-model="queryParams.dayExercisePlanDoneBef6" placeholder="请输入6天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef5">
              <el-input v-model="queryParams.dayExercisePlanDoneBef5" placeholder="请输入5天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef4">
              <el-input v-model="queryParams.dayExercisePlanDoneBef4" placeholder="请输入4天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef3">
              <el-input v-model="queryParams.dayExercisePlanDoneBef3" placeholder="请输入3天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef2">
              <el-input v-model="queryParams.dayExercisePlanDoneBef2" placeholder="请输入2天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef1">
              <el-input v-model="queryParams.dayExercisePlanDoneBef1" placeholder="请输入1天前是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日是否提前完成当日运动计划" prop="dayExercisePlanDoneBef0">
              <el-input v-model="queryParams.dayExercisePlanDoneBef0" placeholder="请输入当日是否提前完成当日运动计划" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="在两次决策时间点内学习X分钟" prop="betweenDecisionLearnDuration">
              <el-input v-model="queryParams.betweenDecisionLearnDuration" placeholder="请输入在两次决策时间点内学习X分钟" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="在两次决策时间点内运动X分钟" prop="betweenDecisionExerciseDuration">
              <el-input v-model="queryParams.betweenDecisionExerciseDuration" placeholder="请输入在两次决策时间点内运动X分钟" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="上午9-12点完成当日运动量达标度" prop="dayAmExerciseCompletionBef0">
              <el-input v-model="queryParams.dayAmExerciseCompletionBef0" placeholder="请输入上午9-12点完成当日运动量达标度" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日低等强度运动运动时长X" prop="dayLowExerciseDurationBef0">
              <el-input v-model="queryParams.dayLowExerciseDurationBef0" placeholder="请输入当日低等强度运动运动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日中等强度运动运动时长X" prop="dayMidExerciseDurationBef0">
              <el-input v-model="queryParams.dayMidExerciseDurationBef0" placeholder="请输入当日中等强度运动运动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日高等强度运动运动时长X" prop="dayHighExerciseDurationBef0">
              <el-input v-model="queryParams.dayHighExerciseDurationBef0" placeholder="请输入当日高等强度运动运动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6天前上午活动时长X" prop="dayAmExerciseDurationBef6">
              <el-input v-model="queryParams.dayAmExerciseDurationBef6" placeholder="请输入6天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6天前下午活动时长X" prop="dayPmExerciseDurationBef6">
              <el-input v-model="queryParams.dayPmExerciseDurationBef6" placeholder="请输入6天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前上午活动时长X" prop="dayAmExerciseDurationBef5">
              <el-input v-model="queryParams.dayAmExerciseDurationBef5" placeholder="请输入5天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前下午活动时长X" prop="dayPmExerciseDurationBef5">
              <el-input v-model="queryParams.dayPmExerciseDurationBef5" placeholder="请输入5天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前上午活动时长X" prop="dayAmExerciseDurationBef4">
              <el-input v-model="queryParams.dayAmExerciseDurationBef4" placeholder="请输入4天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前下午活动时长X" prop="dayPmExerciseDurationBef4">
              <el-input v-model="queryParams.dayPmExerciseDurationBef4" placeholder="请输入4天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前上午活动时长X" prop="dayAmExerciseDurationBef3">
              <el-input v-model="queryParams.dayAmExerciseDurationBef3" placeholder="请输入3天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前下午活动时长X" prop="dayPmExerciseDurationBef3">
              <el-input v-model="queryParams.dayPmExerciseDurationBef3" placeholder="请输入3天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前上午活动时长X" prop="dayAmExerciseDurationBef2">
              <el-input v-model="queryParams.dayAmExerciseDurationBef2" placeholder="请输入2天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前下午活动时长X" prop="dayPmExerciseDurationBef2">
              <el-input v-model="queryParams.dayPmExerciseDurationBef2" placeholder="请输入2天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前上午活动时长X" prop="dayAmExerciseDurationBef1">
              <el-input v-model="queryParams.dayAmExerciseDurationBef1" placeholder="请输入1天前上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前下午活动时长X" prop="dayPmExerciseDurationBef1">
              <el-input v-model="queryParams.dayPmExerciseDurationBef1" placeholder="请输入1天前下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日上午活动时长X" prop="dayAmExerciseDurationBef0">
              <el-input v-model="queryParams.dayAmExerciseDurationBef0" placeholder="请输入当日上午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日下午活动时长X" prop="dayPmExerciseDurationBef0">
              <el-input v-model="queryParams.dayPmExerciseDurationBef0" placeholder="请输入当日下午活动时长X" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="6天前步数" prop="dayStepBef6">
              <el-input v-model="queryParams.dayStepBef6" placeholder="请输入6天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前步数" prop="dayStepBef5">
              <el-input v-model="queryParams.dayStepBef5" placeholder="请输入5天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前步数" prop="dayStepBef4">
              <el-input v-model="queryParams.dayStepBef4" placeholder="请输入4天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前步数" prop="dayStepBef3">
              <el-input v-model="queryParams.dayStepBef3" placeholder="请输入3天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前步数" prop="dayStepBef2">
              <el-input v-model="queryParams.dayStepBef2" placeholder="请输入2天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前步数" prop="dayStepBef1">
              <el-input v-model="queryParams.dayStepBef1" placeholder="请输入1天前步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日步数" prop="dayStepBef0">
              <el-input v-model="queryParams.dayStepBef0" placeholder="请输入当日步数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="在提醒后X分钟内开始运动" prop="dayExerciseCompletionRateBef6">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef6" placeholder="请输入在提醒后X分钟内开始运动" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="5天前运动目标完成率" prop="dayExerciseCompletionRateBef5">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef5" placeholder="请输入5天前运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="4天前运动目标完成率" prop="dayExerciseCompletionRateBef4">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef4" placeholder="请输入4天前运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="3天前运动目标完成率" prop="dayExerciseCompletionRateBef3">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef3" placeholder="请输入3天前运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="2天前运动目标完成率" prop="dayExerciseCompletionRateBef2">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef2" placeholder="请输入2天前运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="1天前运动目标完成率" prop="dayExerciseCompletionRateBef1">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef1" placeholder="请输入1天前运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日运动目标完成率" prop="dayExerciseCompletionRateBef0">
              <el-input v-model="queryParams.dayExerciseCompletionRateBef0" placeholder="请输入当日运动目标完成率" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="在提醒后X分钟内开始运动" prop="exerciseStartAfterInterfereDuration">
              <el-input v-model="queryParams.exerciseStartAfterInterfereDuration" placeholder="请输入在提醒后X分钟内开始运动" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日运动开始时间" prop="dayExerciseStartTime">
              <el-date-picker clearable
                v-model="queryParams.dayExerciseStartTime"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择当日运动开始时间"
              />
            </el-form-item>
            <el-form-item label="超过X天运动量未达标" prop="exerciseUncompletionOverDays">
              <el-input v-model="queryParams.exerciseUncompletionOverDays" placeholder="请输入超过X天运动量未达标" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日运动平均开始时间" prop="dayExerciseAverStartTime">
              <el-date-picker clearable
                v-model="queryParams.dayExerciseAverStartTime"
                type="date"
                value-format="YYYY-MM-DD"
                placeholder="请选择当日运动平均开始时间"
              />
            </el-form-item>
            <el-form-item label="当前每周运动达标强度" prop="currentWeekExerciseIntensity">
              <el-input v-model="queryParams.currentWeekExerciseIntensity" placeholder="请输入当前每周运动达标强度" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当前每日运动达标强度" prop="currentDayExerciseIntensity">
              <el-input v-model="queryParams.currentDayExerciseIntensity" placeholder="请输入当前每日运动达标强度" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="本周是第几运动周期" prop="currentExerciseWeekNumber">
              <el-input v-model="queryParams.currentExerciseWeekNumber" placeholder="请输入本周是第几运动周期" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日所有干预提醒次数" prop="dailyInterventionRemindersCount">
              <el-input v-model="queryParams.dailyInterventionRemindersCount" placeholder="请输入当日所有干预提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日所有成功干预提醒次数" prop="dailyInterventionSuccessRemindersCount">
              <el-input v-model="queryParams.dailyInterventionSuccessRemindersCount" placeholder="请输入当日所有成功干预提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="是否每天允许运动提醒" prop="exerciseReminderCycle">
              <el-input v-model="queryParams.exerciseReminderCycle" placeholder="请输入是否每天允许运动提醒" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="是否每天允许课程提醒" prop="courseReminderCycle">
              <el-input v-model="queryParams.courseReminderCycle" placeholder="请输入是否每天允许课程提醒" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="课程更新后的第几天" prop="dayAfterCourseUpdate">
              <el-input v-model="queryParams.dayAfterCourseUpdate" placeholder="请输入课程更新后的第几天" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="连续忽略运动提醒次数" prop="consecutiveExerciseReminderIgnores">
              <el-input v-model="queryParams.consecutiveExerciseReminderIgnores" placeholder="请输入连续忽略运动提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="连续忽略课程提醒次数" prop="consecutiveCourseReminderIgnores">
              <el-input v-model="queryParams.consecutiveCourseReminderIgnores" placeholder="请输入连续忽略课程提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日运动干预成功提醒次数" prop="dailyExerInterventionSucCount">
              <el-input v-model="queryParams.dailyExerInterventionSucCount" placeholder="请输入当日运动干预成功提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日课程干预成功提醒次数" prop="dailyCourseInterventionSucCount">
              <el-input v-model="queryParams.dailyCourseInterventionSucCount" placeholder="请输入当日课程干预成功提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日运动干预总提醒次数" prop="dailyExerInterventionTotalCount">
              <el-input v-model="queryParams.dailyExerInterventionTotalCount" placeholder="请输入当日运动干预总提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="当日课程干预总提醒次数" prop="dailyCourseInterventionTotalCount">
              <el-input v-model="queryParams.dailyCourseInterventionTotalCount" placeholder="请输入当日课程干预总提醒次数" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item label="触发安全问题停止运动推荐" prop="stopExerciseForSecurity">
              <el-input v-model="queryParams.stopExerciseForSecurity" placeholder="请输入触发安全问题停止运动推荐" clearable @keyup.enter="handleQuery" />
            </el-form-item>
            <el-form-item>
              <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
              <el-button icon="Refresh" @click="resetQuery">重置</el-button>
            </el-form-item>
          </el-form>
        </el-card>
      </div>
    </transition>

    <el-card shadow="never">
      <template #header>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bclt:inferenceLog:add']">新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['bclt:inferenceLog:edit']">修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['bclt:inferenceLog:remove']">删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['bclt:inferenceLog:export']">导出</el-button>
          </el-col>
          <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
      </template>

      <el-table v-loading="loading" :data="inferenceLogList" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="主键id" align="center" prop="id" v-if="true" />
        <el-table-column label="设备id" align="center" prop="deviceId" />
        <el-table-column label="触发的规则ids" align="center" prop="ruleIds" />
        <el-table-column label="推送内容" align="center" prop="content" />
        <el-table-column label="推送编号，1，2，3" align="center" prop="noticeNumber" />
        <el-table-column label="超过X天未学习" align="center" prop="unlearnOverDays" />
        <el-table-column label="课程更新后X小时后开始学习" align="center" prop="learnStartAfterUpdateHour" />
        <el-table-column label="课程更新后第X天完成学习" align="center" prop="learnCompletionAfterUpdateDay" />
        <el-table-column label="课程学习完成数量为X" align="center" prop="courseCompletionNumber" />
        <el-table-column label="课程学习未完成数量X" align="center" prop="courseUncompletionNumber" />
        <el-table-column label="患者当周课程学习进度" align="center" prop="weekLearnCompletionRateBef0" />
        <el-table-column label="患者APP使用为第X周" align="center" prop="appRegisterDuration" />
        <el-table-column label="6天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef6" />
        <el-table-column label="5天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef5" />
        <el-table-column label="4天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef4" />
        <el-table-column label="3天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef3" />
        <el-table-column label="2天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef2" />
        <el-table-column label="1天前忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef1" />
        <el-table-column label="当日忽略运动提醒次数" align="center" prop="dayInterfereIgnoreTimesBef0" />
        <el-table-column label="6日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef6" />
        <el-table-column label="5日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef5" />
        <el-table-column label="4日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef4" />
        <el-table-column label="3日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef3" />
        <el-table-column label="2日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef2" />
        <el-table-column label="1日前干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef1" />
        <el-table-column label="当日干预提醒响应率为X" align="center" prop="dayInterfereResponsivityBef0" />
        <el-table-column label="3周前运动完成率" align="center" prop="weekExerciseCompletionRateBef3" />
        <el-table-column label="2周前运动完成率" align="center" prop="weekExerciseCompletionRateBef2" />
        <el-table-column label="1周前运动完成率" align="center" prop="weekExerciseCompletionRateBef1" />
        <el-table-column label="当周前运动完成率" align="center" prop="weekExerciseCompletionRateBef0" />
        <el-table-column label="6天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef6" />
        <el-table-column label="5天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef5" />
        <el-table-column label="4天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef4" />
        <el-table-column label="3天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef3" />
        <el-table-column label="2天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef2" />
        <el-table-column label="1天前是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef1" />
        <el-table-column label="当日是否提前完成当日运动计划" align="center" prop="dayExercisePlanDoneBef0" />
        <el-table-column label="在两次决策时间点内学习X分钟" align="center" prop="betweenDecisionLearnDuration" />
        <el-table-column label="在两次决策时间点内运动X分钟" align="center" prop="betweenDecisionExerciseDuration" />
        <el-table-column label="上午9-12点完成当日运动量达标度" align="center" prop="dayAmExerciseCompletionBef0" />
        <el-table-column label="当日低等强度运动运动时长X" align="center" prop="dayLowExerciseDurationBef0" />
        <el-table-column label="当日中等强度运动运动时长X" align="center" prop="dayMidExerciseDurationBef0" />
        <el-table-column label="当日高等强度运动运动时长X" align="center" prop="dayHighExerciseDurationBef0" />
        <el-table-column label="6天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef6" />
        <el-table-column label="6天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef6" />
        <el-table-column label="5天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef5" />
        <el-table-column label="5天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef5" />
        <el-table-column label="4天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef4" />
        <el-table-column label="4天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef4" />
        <el-table-column label="3天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef3" />
        <el-table-column label="3天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef3" />
        <el-table-column label="2天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef2" />
        <el-table-column label="2天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef2" />
        <el-table-column label="1天前上午活动时长X" align="center" prop="dayAmExerciseDurationBef1" />
        <el-table-column label="1天前下午活动时长X" align="center" prop="dayPmExerciseDurationBef1" />
        <el-table-column label="当日上午活动时长X" align="center" prop="dayAmExerciseDurationBef0" />
        <el-table-column label="当日下午活动时长X" align="center" prop="dayPmExerciseDurationBef0" />
        <el-table-column label="6天前步数" align="center" prop="dayStepBef6" />
        <el-table-column label="5天前步数" align="center" prop="dayStepBef5" />
        <el-table-column label="4天前步数" align="center" prop="dayStepBef4" />
        <el-table-column label="3天前步数" align="center" prop="dayStepBef3" />
        <el-table-column label="2天前步数" align="center" prop="dayStepBef2" />
        <el-table-column label="1天前步数" align="center" prop="dayStepBef1" />
        <el-table-column label="当日步数" align="center" prop="dayStepBef0" />
        <el-table-column label="在提醒后X分钟内开始运动" align="center" prop="dayExerciseCompletionRateBef6" />
        <el-table-column label="5天前运动目标完成率" align="center" prop="dayExerciseCompletionRateBef5" />
        <el-table-column label="4天前运动目标完成率" align="center" prop="dayExerciseCompletionRateBef4" />
        <el-table-column label="3天前运动目标完成率" align="center" prop="dayExerciseCompletionRateBef3" />
        <el-table-column label="2天前运动目标完成率" align="center" prop="dayExerciseCompletionRateBef2" />
        <el-table-column label="1天前运动目标完成率" align="center" prop="dayExerciseCompletionRateBef1" />
        <el-table-column label="当日运动目标完成率" align="center" prop="dayExerciseCompletionRateBef0" />
        <el-table-column label="在提醒后X分钟内开始运动" align="center" prop="exerciseStartAfterInterfereDuration" />
        <el-table-column label="当日运动开始时间" align="center" prop="dayExerciseStartTime" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.dayExerciseStartTime, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="超过X天运动量未达标" align="center" prop="exerciseUncompletionOverDays" />
        <el-table-column label="当日运动平均开始时间" align="center" prop="dayExerciseAverStartTime" width="180">
          <template #default="scope">
            <span>{{ parseTime(scope.row.dayExerciseAverStartTime, '{y}-{m}-{d}') }}</span>
          </template>
        </el-table-column>
        <el-table-column label="当前每周运动达标强度" align="center" prop="currentWeekExerciseIntensity" />
        <el-table-column label="当前每日运动达标强度" align="center" prop="currentDayExerciseIntensity" />
        <el-table-column label="本周是第几运动周期" align="center" prop="currentExerciseWeekNumber" />
        <el-table-column label="当日所有干预提醒次数" align="center" prop="dailyInterventionRemindersCount" />
        <el-table-column label="当日所有成功干预提醒次数" align="center" prop="dailyInterventionSuccessRemindersCount" />
        <el-table-column label="是否每天允许运动提醒" align="center" prop="exerciseReminderCycle" />
        <el-table-column label="是否每天允许课程提醒" align="center" prop="courseReminderCycle" />
        <el-table-column label="课程更新后的第几天" align="center" prop="dayAfterCourseUpdate" />
        <el-table-column label="连续忽略运动提醒次数" align="center" prop="consecutiveExerciseReminderIgnores" />
        <el-table-column label="连续忽略课程提醒次数" align="center" prop="consecutiveCourseReminderIgnores" />
        <el-table-column label="当日运动干预成功提醒次数" align="center" prop="dailyExerInterventionSucCount" />
        <el-table-column label="当日课程干预成功提醒次数" align="center" prop="dailyCourseInterventionSucCount" />
        <el-table-column label="当日运动干预总提醒次数" align="center" prop="dailyExerInterventionTotalCount" />
        <el-table-column label="当日课程干预总提醒次数" align="center" prop="dailyCourseInterventionTotalCount" />
        <el-table-column label="触发安全问题停止运动推荐" align="center" prop="stopExerciseForSecurity" />
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template #default="scope">
            <el-tooltip content="修改" placement="top">
              <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['bclt:inferenceLog:edit']"></el-button>
            </el-tooltip>
            <el-tooltip content="删除" placement="top">
              <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['bclt:inferenceLog:remove']"></el-button>
            </el-tooltip>
          </template>
        </el-table-column>
      </el-table>

      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
    </el-card>
    <!-- 添加或修改推理日志对话框 -->
    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
      <el-form ref="inferenceLogFormRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="设备id" prop="deviceId">
          <el-input v-model="form.deviceId" placeholder="请输入设备id" />
        </el-form-item>
        <el-form-item label="触发的规则ids" prop="ruleIds">
          <el-input v-model="form.ruleIds" placeholder="请输入触发的规则ids" />
        </el-form-item>
        <el-form-item label="推送内容">
          <editor v-model="form.content" :min-height="192"/>
        </el-form-item>
        <el-form-item label="推送编号，1，2，3" prop="noticeNumber">
          <el-input v-model="form.noticeNumber" placeholder="请输入推送编号，1，2，3" />
        </el-form-item>
        <el-form-item label="超过X天未学习" prop="unlearnOverDays">
          <el-input v-model="form.unlearnOverDays" placeholder="请输入超过X天未学习" />
        </el-form-item>
        <el-form-item label="课程更新后X小时后开始学习" prop="learnStartAfterUpdateHour">
          <el-input v-model="form.learnStartAfterUpdateHour" placeholder="请输入课程更新后X小时后开始学习" />
        </el-form-item>
        <el-form-item label="课程更新后第X天完成学习" prop="learnCompletionAfterUpdateDay">
          <el-input v-model="form.learnCompletionAfterUpdateDay" placeholder="请输入课程更新后第X天完成学习" />
        </el-form-item>
        <el-form-item label="课程学习完成数量为X" prop="courseCompletionNumber">
          <el-input v-model="form.courseCompletionNumber" placeholder="请输入课程学习完成数量为X" />
        </el-form-item>
        <el-form-item label="课程学习未完成数量X" prop="courseUncompletionNumber">
          <el-input v-model="form.courseUncompletionNumber" placeholder="请输入课程学习未完成数量X" />
        </el-form-item>
        <el-form-item label="患者当周课程学习进度" prop="weekLearnCompletionRateBef0">
          <el-input v-model="form.weekLearnCompletionRateBef0" placeholder="请输入患者当周课程学习进度" />
        </el-form-item>
        <el-form-item label="患者APP使用为第X周" prop="appRegisterDuration">
          <el-input v-model="form.appRegisterDuration" placeholder="请输入患者APP使用为第X周" />
        </el-form-item>
        <el-form-item label="6天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef6">
          <el-input v-model="form.dayInterfereIgnoreTimesBef6" placeholder="请输入6天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="5天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef5">
          <el-input v-model="form.dayInterfereIgnoreTimesBef5" placeholder="请输入5天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="4天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef4">
          <el-input v-model="form.dayInterfereIgnoreTimesBef4" placeholder="请输入4天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="3天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef3">
          <el-input v-model="form.dayInterfereIgnoreTimesBef3" placeholder="请输入3天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="2天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef2">
          <el-input v-model="form.dayInterfereIgnoreTimesBef2" placeholder="请输入2天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="1天前忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef1">
          <el-input v-model="form.dayInterfereIgnoreTimesBef1" placeholder="请输入1天前忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="当日忽略运动提醒次数" prop="dayInterfereIgnoreTimesBef0">
          <el-input v-model="form.dayInterfereIgnoreTimesBef0" placeholder="请输入当日忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="6日前干预提醒响应率为X" prop="dayInterfereResponsivityBef6">
          <el-input v-model="form.dayInterfereResponsivityBef6" placeholder="请输入6日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="5日前干预提醒响应率为X" prop="dayInterfereResponsivityBef5">
          <el-input v-model="form.dayInterfereResponsivityBef5" placeholder="请输入5日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="4日前干预提醒响应率为X" prop="dayInterfereResponsivityBef4">
          <el-input v-model="form.dayInterfereResponsivityBef4" placeholder="请输入4日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="3日前干预提醒响应率为X" prop="dayInterfereResponsivityBef3">
          <el-input v-model="form.dayInterfereResponsivityBef3" placeholder="请输入3日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="2日前干预提醒响应率为X" prop="dayInterfereResponsivityBef2">
          <el-input v-model="form.dayInterfereResponsivityBef2" placeholder="请输入2日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="1日前干预提醒响应率为X" prop="dayInterfereResponsivityBef1">
          <el-input v-model="form.dayInterfereResponsivityBef1" placeholder="请输入1日前干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="当日干预提醒响应率为X" prop="dayInterfereResponsivityBef0">
          <el-input v-model="form.dayInterfereResponsivityBef0" placeholder="请输入当日干预提醒响应率为X" />
        </el-form-item>
        <el-form-item label="3周前运动完成率" prop="weekExerciseCompletionRateBef3">
          <el-input v-model="form.weekExerciseCompletionRateBef3" placeholder="请输入3周前运动完成率" />
        </el-form-item>
        <el-form-item label="2周前运动完成率" prop="weekExerciseCompletionRateBef2">
          <el-input v-model="form.weekExerciseCompletionRateBef2" placeholder="请输入2周前运动完成率" />
        </el-form-item>
        <el-form-item label="1周前运动完成率" prop="weekExerciseCompletionRateBef1">
          <el-input v-model="form.weekExerciseCompletionRateBef1" placeholder="请输入1周前运动完成率" />
        </el-form-item>
        <el-form-item label="当周前运动完成率" prop="weekExerciseCompletionRateBef0">
          <el-input v-model="form.weekExerciseCompletionRateBef0" placeholder="请输入当周前运动完成率" />
        </el-form-item>
        <el-form-item label="6天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef6">
          <el-input v-model="form.dayExercisePlanDoneBef6" placeholder="请输入6天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="5天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef5">
          <el-input v-model="form.dayExercisePlanDoneBef5" placeholder="请输入5天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="4天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef4">
          <el-input v-model="form.dayExercisePlanDoneBef4" placeholder="请输入4天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="3天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef3">
          <el-input v-model="form.dayExercisePlanDoneBef3" placeholder="请输入3天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="2天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef2">
          <el-input v-model="form.dayExercisePlanDoneBef2" placeholder="请输入2天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="1天前是否提前完成当日运动计划" prop="dayExercisePlanDoneBef1">
          <el-input v-model="form.dayExercisePlanDoneBef1" placeholder="请输入1天前是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="当日是否提前完成当日运动计划" prop="dayExercisePlanDoneBef0">
          <el-input v-model="form.dayExercisePlanDoneBef0" placeholder="请输入当日是否提前完成当日运动计划" />
        </el-form-item>
        <el-form-item label="在两次决策时间点内学习X分钟" prop="betweenDecisionLearnDuration">
          <el-input v-model="form.betweenDecisionLearnDuration" placeholder="请输入在两次决策时间点内学习X分钟" />
        </el-form-item>
        <el-form-item label="在两次决策时间点内运动X分钟" prop="betweenDecisionExerciseDuration">
          <el-input v-model="form.betweenDecisionExerciseDuration" placeholder="请输入在两次决策时间点内运动X分钟" />
        </el-form-item>
        <el-form-item label="上午9-12点完成当日运动量达标度" prop="dayAmExerciseCompletionBef0">
          <el-input v-model="form.dayAmExerciseCompletionBef0" placeholder="请输入上午9-12点完成当日运动量达标度" />
        </el-form-item>
        <el-form-item label="当日低等强度运动运动时长X" prop="dayLowExerciseDurationBef0">
          <el-input v-model="form.dayLowExerciseDurationBef0" placeholder="请输入当日低等强度运动运动时长X" />
        </el-form-item>
        <el-form-item label="当日中等强度运动运动时长X" prop="dayMidExerciseDurationBef0">
          <el-input v-model="form.dayMidExerciseDurationBef0" placeholder="请输入当日中等强度运动运动时长X" />
        </el-form-item>
        <el-form-item label="当日高等强度运动运动时长X" prop="dayHighExerciseDurationBef0">
          <el-input v-model="form.dayHighExerciseDurationBef0" placeholder="请输入当日高等强度运动运动时长X" />
        </el-form-item>
        <el-form-item label="6天前上午活动时长X" prop="dayAmExerciseDurationBef6">
          <el-input v-model="form.dayAmExerciseDurationBef6" placeholder="请输入6天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="6天前下午活动时长X" prop="dayPmExerciseDurationBef6">
          <el-input v-model="form.dayPmExerciseDurationBef6" placeholder="请输入6天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="5天前上午活动时长X" prop="dayAmExerciseDurationBef5">
          <el-input v-model="form.dayAmExerciseDurationBef5" placeholder="请输入5天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="5天前下午活动时长X" prop="dayPmExerciseDurationBef5">
          <el-input v-model="form.dayPmExerciseDurationBef5" placeholder="请输入5天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="4天前上午活动时长X" prop="dayAmExerciseDurationBef4">
          <el-input v-model="form.dayAmExerciseDurationBef4" placeholder="请输入4天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="4天前下午活动时长X" prop="dayPmExerciseDurationBef4">
          <el-input v-model="form.dayPmExerciseDurationBef4" placeholder="请输入4天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="3天前上午活动时长X" prop="dayAmExerciseDurationBef3">
          <el-input v-model="form.dayAmExerciseDurationBef3" placeholder="请输入3天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="3天前下午活动时长X" prop="dayPmExerciseDurationBef3">
          <el-input v-model="form.dayPmExerciseDurationBef3" placeholder="请输入3天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="2天前上午活动时长X" prop="dayAmExerciseDurationBef2">
          <el-input v-model="form.dayAmExerciseDurationBef2" placeholder="请输入2天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="2天前下午活动时长X" prop="dayPmExerciseDurationBef2">
          <el-input v-model="form.dayPmExerciseDurationBef2" placeholder="请输入2天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="1天前上午活动时长X" prop="dayAmExerciseDurationBef1">
          <el-input v-model="form.dayAmExerciseDurationBef1" placeholder="请输入1天前上午活动时长X" />
        </el-form-item>
        <el-form-item label="1天前下午活动时长X" prop="dayPmExerciseDurationBef1">
          <el-input v-model="form.dayPmExerciseDurationBef1" placeholder="请输入1天前下午活动时长X" />
        </el-form-item>
        <el-form-item label="当日上午活动时长X" prop="dayAmExerciseDurationBef0">
          <el-input v-model="form.dayAmExerciseDurationBef0" placeholder="请输入当日上午活动时长X" />
        </el-form-item>
        <el-form-item label="当日下午活动时长X" prop="dayPmExerciseDurationBef0">
          <el-input v-model="form.dayPmExerciseDurationBef0" placeholder="请输入当日下午活动时长X" />
        </el-form-item>
        <el-form-item label="6天前步数" prop="dayStepBef6">
          <el-input v-model="form.dayStepBef6" placeholder="请输入6天前步数" />
        </el-form-item>
        <el-form-item label="5天前步数" prop="dayStepBef5">
          <el-input v-model="form.dayStepBef5" placeholder="请输入5天前步数" />
        </el-form-item>
        <el-form-item label="4天前步数" prop="dayStepBef4">
          <el-input v-model="form.dayStepBef4" placeholder="请输入4天前步数" />
        </el-form-item>
        <el-form-item label="3天前步数" prop="dayStepBef3">
          <el-input v-model="form.dayStepBef3" placeholder="请输入3天前步数" />
        </el-form-item>
        <el-form-item label="2天前步数" prop="dayStepBef2">
          <el-input v-model="form.dayStepBef2" placeholder="请输入2天前步数" />
        </el-form-item>
        <el-form-item label="1天前步数" prop="dayStepBef1">
          <el-input v-model="form.dayStepBef1" placeholder="请输入1天前步数" />
        </el-form-item>
        <el-form-item label="当日步数" prop="dayStepBef0">
          <el-input v-model="form.dayStepBef0" placeholder="请输入当日步数" />
        </el-form-item>
        <el-form-item label="在提醒后X分钟内开始运动" prop="dayExerciseCompletionRateBef6">
          <el-input v-model="form.dayExerciseCompletionRateBef6" placeholder="请输入在提醒后X分钟内开始运动" />
        </el-form-item>
        <el-form-item label="5天前运动目标完成率" prop="dayExerciseCompletionRateBef5">
          <el-input v-model="form.dayExerciseCompletionRateBef5" placeholder="请输入5天前运动目标完成率" />
        </el-form-item>
        <el-form-item label="4天前运动目标完成率" prop="dayExerciseCompletionRateBef4">
          <el-input v-model="form.dayExerciseCompletionRateBef4" placeholder="请输入4天前运动目标完成率" />
        </el-form-item>
        <el-form-item label="3天前运动目标完成率" prop="dayExerciseCompletionRateBef3">
          <el-input v-model="form.dayExerciseCompletionRateBef3" placeholder="请输入3天前运动目标完成率" />
        </el-form-item>
        <el-form-item label="2天前运动目标完成率" prop="dayExerciseCompletionRateBef2">
          <el-input v-model="form.dayExerciseCompletionRateBef2" placeholder="请输入2天前运动目标完成率" />
        </el-form-item>
        <el-form-item label="1天前运动目标完成率" prop="dayExerciseCompletionRateBef1">
          <el-input v-model="form.dayExerciseCompletionRateBef1" placeholder="请输入1天前运动目标完成率" />
        </el-form-item>
        <el-form-item label="当日运动目标完成率" prop="dayExerciseCompletionRateBef0">
          <el-input v-model="form.dayExerciseCompletionRateBef0" placeholder="请输入当日运动目标完成率" />
        </el-form-item>
        <el-form-item label="在提醒后X分钟内开始运动" prop="exerciseStartAfterInterfereDuration">
          <el-input v-model="form.exerciseStartAfterInterfereDuration" placeholder="请输入在提醒后X分钟内开始运动" />
        </el-form-item>
        <el-form-item label="当日运动开始时间" prop="dayExerciseStartTime">
          <el-date-picker clearable
            v-model="form.dayExerciseStartTime"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择当日运动开始时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="超过X天运动量未达标" prop="exerciseUncompletionOverDays">
          <el-input v-model="form.exerciseUncompletionOverDays" placeholder="请输入超过X天运动量未达标" />
        </el-form-item>
        <el-form-item label="当日运动平均开始时间" prop="dayExerciseAverStartTime">
          <el-date-picker clearable
            v-model="form.dayExerciseAverStartTime"
            type="datetime"
            value-format="YYYY-MM-DD HH:mm:ss"
            placeholder="请选择当日运动平均开始时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="当前每周运动达标强度" prop="currentWeekExerciseIntensity">
          <el-input v-model="form.currentWeekExerciseIntensity" placeholder="请输入当前每周运动达标强度" />
        </el-form-item>
        <el-form-item label="当前每日运动达标强度" prop="currentDayExerciseIntensity">
          <el-input v-model="form.currentDayExerciseIntensity" placeholder="请输入当前每日运动达标强度" />
        </el-form-item>
        <el-form-item label="本周是第几运动周期" prop="currentExerciseWeekNumber">
          <el-input v-model="form.currentExerciseWeekNumber" placeholder="请输入本周是第几运动周期" />
        </el-form-item>
        <el-form-item label="当日所有干预提醒次数" prop="dailyInterventionRemindersCount">
          <el-input v-model="form.dailyInterventionRemindersCount" placeholder="请输入当日所有干预提醒次数" />
        </el-form-item>
        <el-form-item label="当日所有成功干预提醒次数" prop="dailyInterventionSuccessRemindersCount">
          <el-input v-model="form.dailyInterventionSuccessRemindersCount" placeholder="请输入当日所有成功干预提醒次数" />
        </el-form-item>
        <el-form-item label="是否每天允许运动提醒" prop="exerciseReminderCycle">
          <el-input v-model="form.exerciseReminderCycle" placeholder="请输入是否每天允许运动提醒" />
        </el-form-item>
        <el-form-item label="是否每天允许课程提醒" prop="courseReminderCycle">
          <el-input v-model="form.courseReminderCycle" placeholder="请输入是否每天允许课程提醒" />
        </el-form-item>
        <el-form-item label="课程更新后的第几天" prop="dayAfterCourseUpdate">
          <el-input v-model="form.dayAfterCourseUpdate" placeholder="请输入课程更新后的第几天" />
        </el-form-item>
        <el-form-item label="连续忽略运动提醒次数" prop="consecutiveExerciseReminderIgnores">
          <el-input v-model="form.consecutiveExerciseReminderIgnores" placeholder="请输入连续忽略运动提醒次数" />
        </el-form-item>
        <el-form-item label="连续忽略课程提醒次数" prop="consecutiveCourseReminderIgnores">
          <el-input v-model="form.consecutiveCourseReminderIgnores" placeholder="请输入连续忽略课程提醒次数" />
        </el-form-item>
        <el-form-item label="当日运动干预成功提醒次数" prop="dailyExerInterventionSucCount">
          <el-input v-model="form.dailyExerInterventionSucCount" placeholder="请输入当日运动干预成功提醒次数" />
        </el-form-item>
        <el-form-item label="当日课程干预成功提醒次数" prop="dailyCourseInterventionSucCount">
          <el-input v-model="form.dailyCourseInterventionSucCount" placeholder="请输入当日课程干预成功提醒次数" />
        </el-form-item>
        <el-form-item label="当日运动干预总提醒次数" prop="dailyExerInterventionTotalCount">
          <el-input v-model="form.dailyExerInterventionTotalCount" placeholder="请输入当日运动干预总提醒次数" />
        </el-form-item>
        <el-form-item label="当日课程干预总提醒次数" prop="dailyCourseInterventionTotalCount">
          <el-input v-model="form.dailyCourseInterventionTotalCount" placeholder="请输入当日课程干预总提醒次数" />
        </el-form-item>
        <el-form-item label="触发安全问题停止运动推荐" prop="stopExerciseForSecurity">
          <el-input v-model="form.stopExerciseForSecurity" placeholder="请输入触发安全问题停止运动推荐" />
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
          <el-button @click="cancel">取 消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup name="InferenceLog" lang="ts">
import { listInferenceLog, getInferenceLog, delInferenceLog, addInferenceLog, updateInferenceLog } from '@/api/bclt/inferenceLog';
import { InferenceLogVO, InferenceLogQuery, InferenceLogForm } from '@/api/bclt/inferenceLog/types';

const { proxy } = getCurrentInstance() as ComponentInternalInstance;

const inferenceLogList = ref<InferenceLogVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);

const queryFormRef = ref<ElFormInstance>();
const inferenceLogFormRef = ref<ElFormInstance>();

const dialog = reactive<DialogOption>({
  visible: false,
  title: ''
});

const initFormData: InferenceLogForm = {
  id: undefined,
  deviceId: undefined,
  ruleIds: undefined,
  content: undefined,
  noticeNumber: undefined,
  unlearnOverDays: undefined,
  learnStartAfterUpdateHour: undefined,
  learnCompletionAfterUpdateDay: undefined,
  courseCompletionNumber: undefined,
  courseUncompletionNumber: undefined,
  weekLearnCompletionRateBef0: undefined,
  appRegisterDuration: undefined,
  dayInterfereIgnoreTimesBef6: undefined,
  dayInterfereIgnoreTimesBef5: undefined,
  dayInterfereIgnoreTimesBef4: undefined,
  dayInterfereIgnoreTimesBef3: undefined,
  dayInterfereIgnoreTimesBef2: undefined,
  dayInterfereIgnoreTimesBef1: undefined,
  dayInterfereIgnoreTimesBef0: undefined,
  dayInterfereResponsivityBef6: undefined,
  dayInterfereResponsivityBef5: undefined,
  dayInterfereResponsivityBef4: undefined,
  dayInterfereResponsivityBef3: undefined,
  dayInterfereResponsivityBef2: undefined,
  dayInterfereResponsivityBef1: undefined,
  dayInterfereResponsivityBef0: undefined,
  weekExerciseCompletionRateBef3: undefined,
  weekExerciseCompletionRateBef2: undefined,
  weekExerciseCompletionRateBef1: undefined,
  weekExerciseCompletionRateBef0: undefined,
  dayExercisePlanDoneBef6: undefined,
  dayExercisePlanDoneBef5: undefined,
  dayExercisePlanDoneBef4: undefined,
  dayExercisePlanDoneBef3: undefined,
  dayExercisePlanDoneBef2: undefined,
  dayExercisePlanDoneBef1: undefined,
  dayExercisePlanDoneBef0: undefined,
  betweenDecisionLearnDuration: undefined,
  betweenDecisionExerciseDuration: undefined,
  dayAmExerciseCompletionBef0: undefined,
  dayLowExerciseDurationBef0: undefined,
  dayMidExerciseDurationBef0: undefined,
  dayHighExerciseDurationBef0: undefined,
  dayAmExerciseDurationBef6: undefined,
  dayPmExerciseDurationBef6: undefined,
  dayAmExerciseDurationBef5: undefined,
  dayPmExerciseDurationBef5: undefined,
  dayAmExerciseDurationBef4: undefined,
  dayPmExerciseDurationBef4: undefined,
  dayAmExerciseDurationBef3: undefined,
  dayPmExerciseDurationBef3: undefined,
  dayAmExerciseDurationBef2: undefined,
  dayPmExerciseDurationBef2: undefined,
  dayAmExerciseDurationBef1: undefined,
  dayPmExerciseDurationBef1: undefined,
  dayAmExerciseDurationBef0: undefined,
  dayPmExerciseDurationBef0: undefined,
  dayStepBef6: undefined,
  dayStepBef5: undefined,
  dayStepBef4: undefined,
  dayStepBef3: undefined,
  dayStepBef2: undefined,
  dayStepBef1: undefined,
  dayStepBef0: undefined,
  dayExerciseCompletionRateBef6: undefined,
  dayExerciseCompletionRateBef5: undefined,
  dayExerciseCompletionRateBef4: undefined,
  dayExerciseCompletionRateBef3: undefined,
  dayExerciseCompletionRateBef2: undefined,
  dayExerciseCompletionRateBef1: undefined,
  dayExerciseCompletionRateBef0: undefined,
  exerciseStartAfterInterfereDuration: undefined,
  dayExerciseStartTime: undefined,
  exerciseUncompletionOverDays: undefined,
  dayExerciseAverStartTime: undefined,
  currentWeekExerciseIntensity: undefined,
  currentDayExerciseIntensity: undefined,
  currentExerciseWeekNumber: undefined,
  dailyInterventionRemindersCount: undefined,
  dailyInterventionSuccessRemindersCount: undefined,
  exerciseReminderCycle: undefined,
  courseReminderCycle: undefined,
  dayAfterCourseUpdate: undefined,
  consecutiveExerciseReminderIgnores: undefined,
  consecutiveCourseReminderIgnores: undefined,
  dailyExerInterventionSucCount: undefined,
  dailyCourseInterventionSucCount: undefined,
  dailyExerInterventionTotalCount: undefined,
  dailyCourseInterventionTotalCount: undefined,
  stopExerciseForSecurity: undefined,
}
const data = reactive<PageData<InferenceLogForm, InferenceLogQuery>>({
  form: {...initFormData},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    deviceId: undefined,
    ruleIds: undefined,
    content: undefined,
    noticeNumber: undefined,
    unlearnOverDays: undefined,
    learnStartAfterUpdateHour: undefined,
    learnCompletionAfterUpdateDay: undefined,
    courseCompletionNumber: undefined,
    courseUncompletionNumber: undefined,
    weekLearnCompletionRateBef0: undefined,
    appRegisterDuration: undefined,
    dayInterfereIgnoreTimesBef6: undefined,
    dayInterfereIgnoreTimesBef5: undefined,
    dayInterfereIgnoreTimesBef4: undefined,
    dayInterfereIgnoreTimesBef3: undefined,
    dayInterfereIgnoreTimesBef2: undefined,
    dayInterfereIgnoreTimesBef1: undefined,
    dayInterfereIgnoreTimesBef0: undefined,
    dayInterfereResponsivityBef6: undefined,
    dayInterfereResponsivityBef5: undefined,
    dayInterfereResponsivityBef4: undefined,
    dayInterfereResponsivityBef3: undefined,
    dayInterfereResponsivityBef2: undefined,
    dayInterfereResponsivityBef1: undefined,
    dayInterfereResponsivityBef0: undefined,
    weekExerciseCompletionRateBef3: undefined,
    weekExerciseCompletionRateBef2: undefined,
    weekExerciseCompletionRateBef1: undefined,
    weekExerciseCompletionRateBef0: undefined,
    dayExercisePlanDoneBef6: undefined,
    dayExercisePlanDoneBef5: undefined,
    dayExercisePlanDoneBef4: undefined,
    dayExercisePlanDoneBef3: undefined,
    dayExercisePlanDoneBef2: undefined,
    dayExercisePlanDoneBef1: undefined,
    dayExercisePlanDoneBef0: undefined,
    betweenDecisionLearnDuration: undefined,
    betweenDecisionExerciseDuration: undefined,
    dayAmExerciseCompletionBef0: undefined,
    dayLowExerciseDurationBef0: undefined,
    dayMidExerciseDurationBef0: undefined,
    dayHighExerciseDurationBef0: undefined,
    dayAmExerciseDurationBef6: undefined,
    dayPmExerciseDurationBef6: undefined,
    dayAmExerciseDurationBef5: undefined,
    dayPmExerciseDurationBef5: undefined,
    dayAmExerciseDurationBef4: undefined,
    dayPmExerciseDurationBef4: undefined,
    dayAmExerciseDurationBef3: undefined,
    dayPmExerciseDurationBef3: undefined,
    dayAmExerciseDurationBef2: undefined,
    dayPmExerciseDurationBef2: undefined,
    dayAmExerciseDurationBef1: undefined,
    dayPmExerciseDurationBef1: undefined,
    dayAmExerciseDurationBef0: undefined,
    dayPmExerciseDurationBef0: undefined,
    dayStepBef6: undefined,
    dayStepBef5: undefined,
    dayStepBef4: undefined,
    dayStepBef3: undefined,
    dayStepBef2: undefined,
    dayStepBef1: undefined,
    dayStepBef0: undefined,
    dayExerciseCompletionRateBef6: undefined,
    dayExerciseCompletionRateBef5: undefined,
    dayExerciseCompletionRateBef4: undefined,
    dayExerciseCompletionRateBef3: undefined,
    dayExerciseCompletionRateBef2: undefined,
    dayExerciseCompletionRateBef1: undefined,
    dayExerciseCompletionRateBef0: undefined,
    exerciseStartAfterInterfereDuration: undefined,
    dayExerciseStartTime: undefined,
    exerciseUncompletionOverDays: undefined,
    dayExerciseAverStartTime: undefined,
    currentWeekExerciseIntensity: undefined,
    currentDayExerciseIntensity: undefined,
    currentExerciseWeekNumber: undefined,
    dailyInterventionRemindersCount: undefined,
    dailyInterventionSuccessRemindersCount: undefined,
    exerciseReminderCycle: undefined,
    courseReminderCycle: undefined,
    dayAfterCourseUpdate: undefined,
    consecutiveExerciseReminderIgnores: undefined,
    consecutiveCourseReminderIgnores: undefined,
    dailyExerInterventionSucCount: undefined,
    dailyCourseInterventionSucCount: undefined,
    dailyExerInterventionTotalCount: undefined,
    dailyCourseInterventionTotalCount: undefined,
    stopExerciseForSecurity: undefined,
    params: {
    }
  },
  rules: {
    id: [
      { required: true, message: "主键id不能为空", trigger: "blur" }
    ],
    deviceId: [
      { required: true, message: "设备id不能为空", trigger: "blur" }
    ],
  }
});

const { queryParams, form, rules } = toRefs(data);

/** 查询推理日志列表 */
const getList = async () => {
  loading.value = true;
  const res = await listInferenceLog(queryParams.value);
  inferenceLogList.value = res.rows;
  total.value = res.total;
  loading.value = false;
}

/** 取消按钮 */
const cancel = () => {
  reset();
  dialog.visible = false;
}

/** 表单重置 */
const reset = () => {
  form.value = {...initFormData};
  inferenceLogFormRef.value?.resetFields();
}

/** 搜索按钮操作 */
const handleQuery = () => {
  queryParams.value.pageNum = 1;
  getList();
}

/** 重置按钮操作 */
const resetQuery = () => {
  queryFormRef.value?.resetFields();
  handleQuery();
}

/** 多选框选中数据 */
const handleSelectionChange = (selection: InferenceLogVO[]) => {
  ids.value = selection.map(item => item.id);
  single.value = selection.length != 1;
  multiple.value = !selection.length;
}

/** 新增按钮操作 */
const handleAdd = () => {
  reset();
  dialog.visible = true;
  dialog.title = "添加推理日志";
}

/** 修改按钮操作 */
const handleUpdate = async (row?: InferenceLogVO) => {
  reset();
  const _id = row?.id || ids.value[0]
  const res = await getInferenceLog(_id);
  Object.assign(form.value, res.data);
  dialog.visible = true;
  dialog.title = "修改推理日志";
}

/** 提交按钮 */
const submitForm = () => {
  inferenceLogFormRef.value?.validate(async (valid: boolean) => {
    if (valid) {
      buttonLoading.value = true;
      if (form.value.id) {
        await updateInferenceLog(form.value).finally(() =>  buttonLoading.value = false);
      } else {
        await addInferenceLog(form.value).finally(() =>  buttonLoading.value = false);
      }
      proxy?.$modal.msgSuccess("操作成功");
      dialog.visible = false;
      await getList();
    }
  });
}

/** 删除按钮操作 */
const handleDelete = async (row?: InferenceLogVO) => {
  const _ids = row?.id || ids.value;
  await proxy?.$modal.confirm('是否确认删除推理日志编号为"' + _ids + '"的数据项？').finally(() => loading.value = false);
  await delInferenceLog(_ids);
  proxy?.$modal.msgSuccess("删除成功");
  await getList();
}

/** 导出按钮操作 */
const handleExport = () => {
  proxy?.download('bclt/inferenceLog/export', {
    ...queryParams.value
  }, `inferenceLog_${new Date().getTime()}.xlsx`)
}

onMounted(() => {
  getList();
});
</script>
